import { createBrowserRouter } from "react-router-dom";

import Layout from "@/pages/Layout";
import Month from "@/pages/Month";
import Year from "@/pages/Year";
import New from "@/pages/New";


// 创建路由实例 绑定path element
const Router = createBrowserRouter([
      {
            path: '/',
            element: <Layout />,
            children: [
                  {
                        path: 'Month',
                        element: <Month />
                  },
                  {
                        path: 'Year',
                        element: <Year />
                  }
            ]
      },
      {
            path: '/new',
            element: <New />
      }
])

export default Router;